package com.ops.service.ns.system.client;

import java.io.Serializable;
import java.net.URL;
import java.util.logging.Level;
import java.util.logging.Logger;

import javax.xml.namespace.QName;
import javax.xml.ws.BindingProvider;
import javax.xml.ws.WebServiceException;

import com.ops.schema.ns.system.LoginRequest;
import com.ops.schema.ns.system.LoginResponse;
import com.ops.schema.ns.system.LogoutRequest;
import com.ops.schema.ns.system.LogoutResponse;
import com.ops.schema.ns.system.OPSRecordAuditInfo;
import com.ops.schema.ns.system.OPSUser;
import com.ops.schema.ns.system.RetrieveMenuRequest;
import com.ops.schema.ns.system.RetrieveMenuResponse;
import com.ops.schema.ns.system.RetrieveRolesRequest;
import com.ops.schema.ns.system.RetrieveRolesResponse;
import com.ops.schema.ns.system.SearchLookUpsRequest;
import com.ops.schema.ns.system.SearchLookUpsResponse;
import com.ops.schema.ns.system.SearchMessagesRequest;
import com.ops.schema.ns.system.SearchMessagesResponse;
import com.ops.schema.ns.system.SearchParametersRequest;
import com.ops.schema.ns.system.SearchParametersResponse;
import com.ops.schema.ns.system.SearchRuleBindsRequest;
import com.ops.schema.ns.system.SearchRuleBindsResponse;
import com.ops.schema.ns.system.SearchRuleRatesRequest;
import com.ops.schema.ns.system.SearchRuleRatesResponse;
import com.ops.schema.ns.system.SearchRulesRequest;
import com.ops.schema.ns.system.SearchRulesResponse;
import com.ops.schema.ns.system.SearchTaxAuthoritiesRequest;
import com.ops.schema.ns.system.SearchTaxAuthoritiesResponse;
import com.ops.schema.ns.system.SearchUserActionsRequest;
import com.ops.schema.ns.system.SearchUserActionsResponse;
import com.ops.schema.ns.system.SearchUserSessionsRequest;
import com.ops.schema.ns.system.SearchUserSessionsResponse;
import com.ops.schema.ns.system.SearchUsersRequest;
import com.ops.schema.ns.system.SearchUsersResponse;
import com.ops.schema.ns.system.UpdateLookUpsRequest;
import com.ops.schema.ns.system.UpdateLookUpsResponse;
import com.ops.schema.ns.system.UpdateMessagesRequest;
import com.ops.schema.ns.system.UpdateMessagesResponse;
import com.ops.schema.ns.system.UpdateParametersRequest;
import com.ops.schema.ns.system.UpdateParametersResponse;
import com.ops.schema.ns.system.UpdateRuleRatesRequest;
import com.ops.schema.ns.system.UpdateRuleRatesResponse;
import com.ops.schema.ns.system.UpdateRulesRequest;
import com.ops.schema.ns.system.UpdateRulesResponse;
import com.ops.schema.ns.system.UpdateTaxAuthoritiesRequest;
import com.ops.schema.ns.system.UpdateTaxAuthoritiesResponse;
import com.ops.schema.ns.system.UpdateUsersRequest;
import com.ops.schema.ns.system.UpdateUsersResponse;
import com.ops.service.ns.system.FaultMessage;
import com.ops.service.ns.system.OnlinePayrollServices;
import com.ops.service.ns.system.OnlinePayrollSystemService;
import com.ops.service.ns.system.constants.ParamConstants;
import com.ops.service.ns.system.exception.ServiceException;
import com.ops.service.ns.system.helper.OPSJNDIContext;

public class OnlinePayrollSystemServiceClient implements Serializable{

    private static final long serialVersionUID = 1153712350015174905L;
    private static final Logger LOG = Logger.getLogger(OnlinePayrollSystemServiceClient.class.getName());
	//private static String opsServiceURL = "http://localhost:8080/OnlinePayrollSystemService/OnlinePayrollServices";
	private static String opsServiceURL = OPSJNDIContext.getJNDIValue(ParamConstants.OPS_SERVICE_SERVICE_URL);
	
    public static LoginResponse login(LoginRequest loginRequest) throws ServiceException{
    	
    	LoginResponse response = null;
    	
    	try {

            QName qName = new QName("http://service.ops.com/ns/system", "OnlinePayrollServices");
			URL url = OnlinePayrollSystemServiceClient.class.getClassLoader().getResource("OnlinePayrollSystemService.wsdl");

			OnlinePayrollServices service = new OnlinePayrollServices(url, qName);
			OnlinePayrollSystemService port = service.getPort(OnlinePayrollSystemService.class);
			
			BindingProvider bp = (BindingProvider)port;
			bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, opsServiceURL);
			
	        response = port.login(loginRequest);
	        LOG.log(Level.INFO, "@@@@@@@@@@@@@@@@@@@@@@@@@ login Call is successful");

		} catch (FaultMessage e) {
            LOG.log(Level.SEVERE, "login: exception thrown", e);
            throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
        } catch (javax.xml.ws.soap.SOAPFaultException e) {
            LOG.log(Level.SEVERE, "login: SOAPFaultException thrown", e);
            throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
        } catch (WebServiceException e) {
            LOG.log(Level.SEVERE, "login: WebServiceException thrown", e);
            throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
        } catch (Throwable th) {
            LOG.log(Level.SEVERE, "login: exception thrown", th);
            throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + th.getMessage());
        }
    	return response;
    }
    
 public static LogoutResponse logout(LogoutRequest LogoutRequest) throws ServiceException{
    	
    	LogoutResponse response = null;
    	
    	try {

            QName qName = new QName("http://service.ops.com/ns/system", "OnlinePayrollServices");
			URL url = OnlinePayrollSystemServiceClient.class.getClassLoader().getResource("OnlinePayrollSystemService.wsdl");

			OnlinePayrollServices service = new OnlinePayrollServices(url, qName);
			OnlinePayrollSystemService port = service.getPort(OnlinePayrollSystemService.class);
			
			BindingProvider bp = (BindingProvider)port;
			bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, opsServiceURL);
			
	        response = port.logout(LogoutRequest);
	        LOG.log(Level.INFO, "@@@@@@@@@@@@@@@@@@@@@@@@@ Logout Call is successful");

		} catch (FaultMessage e) {
            LOG.log(Level.SEVERE, "Logout: exception thrown", e);
            throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
        } catch (javax.xml.ws.soap.SOAPFaultException e) {
            LOG.log(Level.SEVERE, "Logout: SOAPFaultException thrown", e);
            throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
        } catch (WebServiceException e) {
            LOG.log(Level.SEVERE, "Logout: WebServiceException thrown", e);
            throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
        } catch (Throwable th) {
            LOG.log(Level.SEVERE, "Logout: exception thrown", th);
            throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + th.getMessage());
        }
    	return response;
    }   
 public static RetrieveMenuResponse retriveMenu(RetrieveMenuRequest retrieveMenuRequest) throws ServiceException{
 	
	 RetrieveMenuResponse response = null;
 	
 	try {

         QName qName = new QName("http://service.ops.com/ns/system", "OnlinePayrollServices");
			URL url = OnlinePayrollSystemServiceClient.class.getClassLoader().getResource("OnlinePayrollSystemService.wsdl");

			OnlinePayrollServices service = new OnlinePayrollServices(url, qName);
			OnlinePayrollSystemService port = service.getPort(OnlinePayrollSystemService.class);
			
			BindingProvider bp = (BindingProvider)port;
			bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, opsServiceURL);
			
	        response = port.retrieveMenu(retrieveMenuRequest);
	        LOG.log(Level.INFO, "@@@@@@@@@@@@@@@@@@@@@@@@@ Logout Call is successful");

		} catch (FaultMessage e) {
         LOG.log(Level.SEVERE, "Logout: exception thrown", e);
         throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
     } catch (javax.xml.ws.soap.SOAPFaultException e) {
         LOG.log(Level.SEVERE, "Logout: SOAPFaultException thrown", e);
         throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
     } catch (WebServiceException e) {
         LOG.log(Level.SEVERE, "Logout: WebServiceException thrown", e);
         throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
     } catch (Throwable th) {
         LOG.log(Level.SEVERE, "Logout: exception thrown", th);
         throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + th.getMessage());
     }
 	return response;
 }   
    
public static SearchParametersResponse searchParameter(SearchParametersRequest parametersRequest) throws ServiceException{
    	
    	SearchParametersResponse response = null;
    	
    	try {

            QName qName = new QName("http://service.ops.com/ns/system", "OnlinePayrollServices");
			URL url = OnlinePayrollSystemServiceClient.class.getClassLoader().getResource("OnlinePayrollSystemService.wsdl");

			OnlinePayrollServices service = new OnlinePayrollServices(url, qName);
			OnlinePayrollSystemService port = service.getPort(OnlinePayrollSystemService.class);
			
			BindingProvider bp = (BindingProvider)port;
			bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, opsServiceURL);
			
	        response = port.searchParameters(parametersRequest);
	        LOG.log(Level.INFO, "@@@@@@@@@@@@@@@@@@@@@@@@@ searchParameters Call is successful");

		} catch (FaultMessage e) {
            LOG.log(Level.SEVERE, "search: exception thrown", e);
            throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
        } catch (javax.xml.ws.soap.SOAPFaultException e) {
            LOG.log(Level.SEVERE, "search: SOAPFaultException thrown", e);
            throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
        } catch (WebServiceException e) {
            LOG.log(Level.SEVERE, "search: WebServiceException thrown", e);
            throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
        } catch (Throwable th) {
            LOG.log(Level.SEVERE, "search: exception thrown", th);
            throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + th.getMessage());
        }
    	return response;
    }

public static UpdateParametersResponse saveParameter(UpdateParametersRequest parametersRequest) throws ServiceException{
	
	UpdateParametersResponse response = null;
	
	try {
        QName qName = new QName("http://service.ops.com/ns/system", "OnlinePayrollServices");
		URL url = OnlinePayrollSystemServiceClient.class.getClassLoader().getResource("OnlinePayrollSystemService.wsdl");

		OnlinePayrollServices service = new OnlinePayrollServices(url, qName);
		OnlinePayrollSystemService port = service.getPort(OnlinePayrollSystemService.class);
		
		BindingProvider bp = (BindingProvider)port;
		bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, opsServiceURL);
		
        response = port.updateParameters(parametersRequest);
        LOG.log(Level.INFO, "@@@@@@@@@@@@@@@@@@@@@@@@@ saveParameter Call is successful");

	} catch (FaultMessage e) {
        LOG.log(Level.SEVERE, "saveParameter: exception thrown", e);
        throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
    } catch (javax.xml.ws.soap.SOAPFaultException e) {
        LOG.log(Level.SEVERE, "saveParameter: SOAPFaultException thrown", e);
        throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
    } catch (WebServiceException e) {
        LOG.log(Level.SEVERE, "saveParameter: WebServiceException thrown", e);
        throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
    } catch (Throwable th) {
        LOG.log(Level.SEVERE, "saveParameter: exception thrown", th);
        throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + th.getMessage());
    }
	return response;
}
public static SearchMessagesResponse searchMessage(SearchMessagesRequest MessagesRequest) throws ServiceException{
    	
    	SearchMessagesResponse response = null;
    	
    	try {

            QName qName = new QName("http://service.ops.com/ns/system", "OnlinePayrollServices");
			URL url = OnlinePayrollSystemServiceClient.class.getClassLoader().getResource("OnlinePayrollSystemService.wsdl");

			OnlinePayrollServices service = new OnlinePayrollServices(url, qName);
			OnlinePayrollSystemService port = service.getPort(OnlinePayrollSystemService.class);
			
			BindingProvider bp = (BindingProvider)port;
			bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, opsServiceURL);
			
	        response = port.searchMessages(MessagesRequest);
	        LOG.log(Level.INFO, "@@@@@@@@@@@@@@@@@@@@@@@@@ searchMessages Call is successful");

		} catch (FaultMessage e) {
            LOG.log(Level.SEVERE, "search: exception thrown", e);
            throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
        } catch (javax.xml.ws.soap.SOAPFaultException e) {
            LOG.log(Level.SEVERE, "search: SOAPFaultException thrown", e);
            throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
        } catch (WebServiceException e) {
            LOG.log(Level.SEVERE, "search: WebServiceException thrown", e);
            throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
        } catch (Throwable th) {
            LOG.log(Level.SEVERE, "search: exception thrown", th);
            throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + th.getMessage());
        }
    	return response;
    }

public static UpdateMessagesResponse saveMessage(UpdateMessagesRequest MessagesRequest) throws ServiceException{
	
	UpdateMessagesResponse response = null;
	
	try {
        QName qName = new QName("http://service.ops.com/ns/system", "OnlinePayrollServices");
		URL url = OnlinePayrollSystemServiceClient.class.getClassLoader().getResource("OnlinePayrollSystemService.wsdl");

		OnlinePayrollServices service = new OnlinePayrollServices(url, qName);
		OnlinePayrollSystemService port = service.getPort(OnlinePayrollSystemService.class);
		
		BindingProvider bp = (BindingProvider)port;
		bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, opsServiceURL);
		
        response = port.updateMessages(MessagesRequest);
        LOG.log(Level.INFO, "@@@@@@@@@@@@@@@@@@@@@@@@@ saveParameter Call is successful");

	} catch (FaultMessage e) {
        LOG.log(Level.SEVERE, "saveParameter: exception thrown", e);
        throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
    } catch (javax.xml.ws.soap.SOAPFaultException e) {
        LOG.log(Level.SEVERE, "saveParameter: SOAPFaultException thrown", e);
        throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
    } catch (WebServiceException e) {
        LOG.log(Level.SEVERE, "saveParameter: WebServiceException thrown", e);
        throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
    } catch (Throwable th) {
        LOG.log(Level.SEVERE, "saveParameter: exception thrown", th);
        throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + th.getMessage());
    }
	return response;
}
   

public static SearchLookUpsResponse searchLookUp(SearchLookUpsRequest LookUpsRequest) throws ServiceException{
	
	SearchLookUpsResponse response = null;
	
	try {

        QName qName = new QName("http://service.ops.com/ns/system", "OnlinePayrollServices");
		URL url = OnlinePayrollSystemServiceClient.class.getClassLoader().getResource("OnlinePayrollSystemService.wsdl");

		OnlinePayrollServices service = new OnlinePayrollServices(url, qName);
		OnlinePayrollSystemService port = service.getPort(OnlinePayrollSystemService.class);
		
		BindingProvider bp = (BindingProvider)port;
		bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, opsServiceURL);
		
        response = port.searchLookups(LookUpsRequest);
        LOG.log(Level.INFO, "@@@@@@@@@@@@@@@@@@@@@@@@@ searchLookUps Call is successful");

	} catch (FaultMessage e) {
        LOG.log(Level.SEVERE, "search: exception thrown", e);
        throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
    } catch (javax.xml.ws.soap.SOAPFaultException e) {
        LOG.log(Level.SEVERE, "search: SOAPFaultException thrown", e);
        throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
    } catch (WebServiceException e) {
        LOG.log(Level.SEVERE, "search: WebServiceException thrown", e);
        throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
    } catch (Throwable th) {
        LOG.log(Level.SEVERE, "search: exception thrown", th);
        throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + th.getMessage());
    }
	return response;
}

public static UpdateLookUpsResponse saveLookUp(UpdateLookUpsRequest LookUpsRequest) throws ServiceException{

UpdateLookUpsResponse response = null;

try {
    QName qName = new QName("http://service.ops.com/ns/system", "OnlinePayrollServices");
	URL url = OnlinePayrollSystemServiceClient.class.getClassLoader().getResource("OnlinePayrollSystemService.wsdl");

	OnlinePayrollServices service = new OnlinePayrollServices(url, qName);
	OnlinePayrollSystemService port = service.getPort(OnlinePayrollSystemService.class);
	
	BindingProvider bp = (BindingProvider)port;
	bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, opsServiceURL);
	
    response = port.updateLookups(LookUpsRequest);
    LOG.log(Level.INFO, "@@@@@@@@@@@@@@@@@@@@@@@@@ saveParameter Call is successful");

} catch (FaultMessage e) {
    LOG.log(Level.SEVERE, "saveParameter: exception thrown", e);
    throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
} catch (javax.xml.ws.soap.SOAPFaultException e) {
    LOG.log(Level.SEVERE, "saveParameter: SOAPFaultException thrown", e);
    throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
} catch (WebServiceException e) {
    LOG.log(Level.SEVERE, "saveParameter: WebServiceException thrown", e);
    throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
} catch (Throwable th) {
    LOG.log(Level.SEVERE, "saveParameter: exception thrown", th);
    throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + th.getMessage());
}
return response;
}
public static SearchRulesResponse searchRule(SearchRulesRequest rulesRequest) throws ServiceException{
	
	SearchRulesResponse response = null;
	
	try {

        QName qName = new QName("http://service.ops.com/ns/system", "OnlinePayrollServices");
		URL url = OnlinePayrollSystemServiceClient.class.getClassLoader().getResource("OnlinePayrollSystemService.wsdl");

		OnlinePayrollServices service = new OnlinePayrollServices(url, qName);
		OnlinePayrollSystemService port = service.getPort(OnlinePayrollSystemService.class);
		
		BindingProvider bp = (BindingProvider)port;
		bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, opsServiceURL);
		
        response = port.searchRules(rulesRequest);
        LOG.log(Level.INFO, "@@@@@@@@@@@@@@@@@@@@@@@@@ searchRule Call is successfull");

	} catch (FaultMessage e) {
        LOG.log(Level.SEVERE, "search: exception thrown", e);
        throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
    } catch (javax.xml.ws.soap.SOAPFaultException e) {
        LOG.log(Level.SEVERE, "search: SOAPFaultException thrown", e);
        throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
    } catch (WebServiceException e) {
        LOG.log(Level.SEVERE, "search: WebServiceException thrown", e);
        throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
    } catch (Throwable th) {
        LOG.log(Level.SEVERE, "search: exception thrown", th);
        throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + th.getMessage());
    }
	return response;
}

public static UpdateRulesResponse saveRule(UpdateRulesRequest rulesRequest) throws ServiceException{

UpdateRulesResponse response = null;

try {
    QName qName = new QName("http://service.ops.com/ns/system", "OnlinePayrollServices");
	URL url = OnlinePayrollSystemServiceClient.class.getClassLoader().getResource("OnlinePayrollSystemService.wsdl");

	OnlinePayrollServices service = new OnlinePayrollServices(url, qName);
	OnlinePayrollSystemService port = service.getPort(OnlinePayrollSystemService.class);
	
	BindingProvider bp = (BindingProvider)port;
	bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, opsServiceURL);
	
    response = port.updateRules(rulesRequest);
    LOG.log(Level.INFO, "@@@@@@@@@@@@@@@@@@@@@@@@@ updateRules Call is successfull");

} catch (FaultMessage e) {
    LOG.log(Level.SEVERE, "saveParameter: exception thrown", e);
    throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
} catch (javax.xml.ws.soap.SOAPFaultException e) {
    LOG.log(Level.SEVERE, "saveParameter: SOAPFaultException thrown", e);
    throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
} catch (WebServiceException e) {
    LOG.log(Level.SEVERE, "saveParameter: WebServiceException thrown", e);
    throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
} catch (Throwable th) {
    LOG.log(Level.SEVERE, "saveParameter: exception thrown", th);
    throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + th.getMessage());
}
return response;
}

public static SearchRuleBindsResponse searchRuleBind(SearchRuleBindsRequest ruleBindsRequest) throws ServiceException{
	
	SearchRuleBindsResponse response = null;
	
	try {

        QName qName = new QName("http://service.ops.com/ns/system", "OnlinePayrollServices");
		URL url = OnlinePayrollSystemServiceClient.class.getClassLoader().getResource("OnlinePayrollSystemService.wsdl");

		OnlinePayrollServices service = new OnlinePayrollServices(url, qName);
		OnlinePayrollSystemService port = service.getPort(OnlinePayrollSystemService.class);
		
		BindingProvider bp = (BindingProvider)port;
		bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, opsServiceURL);
		
        response = port.searchRuleBinds(ruleBindsRequest);
        LOG.log(Level.INFO, "@@@@@@@@@@@@@@@@@@@@@@@@@ searchRuleBind Call is successfull");

	} catch (FaultMessage e) {
        LOG.log(Level.SEVERE, "search: exception thrown", e);
        throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
    } catch (javax.xml.ws.soap.SOAPFaultException e) {
        LOG.log(Level.SEVERE, "search: SOAPFaultException thrown", e);
        throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
    } catch (WebServiceException e) {
        LOG.log(Level.SEVERE, "search: WebServiceException thrown", e);
        throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
    } catch (Throwable th) {
        LOG.log(Level.SEVERE, "search: exception thrown", th);
        throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + th.getMessage());
    }
	return response;
}

public static SearchRuleRatesResponse searchRuleRate(SearchRuleRatesRequest ruleRatesRequest) throws ServiceException{
	
	SearchRuleRatesResponse response = null;
	
	try {

        QName qName = new QName("http://service.ops.com/ns/system", "OnlinePayrollServices");
		URL url = OnlinePayrollSystemServiceClient.class.getClassLoader().getResource("OnlinePayrollSystemService.wsdl");

		OnlinePayrollServices service = new OnlinePayrollServices(url, qName);
		OnlinePayrollSystemService port = service.getPort(OnlinePayrollSystemService.class);
		
		BindingProvider bp = (BindingProvider)port;
		bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, opsServiceURL);
		
        response = port.searchRuleRates(ruleRatesRequest);
        LOG.log(Level.INFO, "@@@@@@@@@@@@@@@@@@@@@@@@@ searchRuleRate Call is successfull");

	} catch (FaultMessage e) {
        LOG.log(Level.SEVERE, "search: exception thrown", e);
        throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
    } catch (javax.xml.ws.soap.SOAPFaultException e) {
        LOG.log(Level.SEVERE, "search: SOAPFaultException thrown", e);
        throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
    } catch (WebServiceException e) {
        LOG.log(Level.SEVERE, "search: WebServiceException thrown", e);
        throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
    } catch (Throwable th) {
        LOG.log(Level.SEVERE, "search: exception thrown", th);
        throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + th.getMessage());
    }
	return response;
}

public static UpdateRuleRatesResponse saveRuleRate(UpdateRuleRatesRequest ruleRatesRequest) throws ServiceException{

UpdateRuleRatesResponse response = null;

try {
    QName qName = new QName("http://service.ops.com/ns/system", "OnlinePayrollServices");
	URL url = OnlinePayrollSystemServiceClient.class.getClassLoader().getResource("OnlinePayrollSystemService.wsdl");

	OnlinePayrollServices service = new OnlinePayrollServices(url, qName);
	OnlinePayrollSystemService port = service.getPort(OnlinePayrollSystemService.class);
	
	BindingProvider bp = (BindingProvider)port;
	bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, opsServiceURL);
	
    response = port.updateRuleRates(ruleRatesRequest);
    LOG.log(Level.INFO, "@@@@@@@@@@@@@@@@@@@@@@@@@ updateRuleRates Call is successfull");

} catch (FaultMessage e) {
    LOG.log(Level.SEVERE, "saveParameter: exception thrown", e);
    throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
} catch (javax.xml.ws.soap.SOAPFaultException e) {
    LOG.log(Level.SEVERE, "saveParameter: SOAPFaultException thrown", e);
    throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
} catch (WebServiceException e) {
    LOG.log(Level.SEVERE, "saveParameter: WebServiceException thrown", e);
    throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
} catch (Throwable th) {
    LOG.log(Level.SEVERE, "saveParameter: exception thrown", th);
    throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + th.getMessage());
}
return response;
}
public static SearchUserSessionsResponse searchUserSessions(SearchUserSessionsRequest userSessionsRequest) throws ServiceException{

SearchUserSessionsResponse response = null;

try {

    QName qName = new QName("http://service.ops.com/ns/system", "OnlinePayrollServices");
	URL url = OnlinePayrollSystemServiceClient.class.getClassLoader().getResource("OnlinePayrollSystemService.wsdl");

	OnlinePayrollServices service = new OnlinePayrollServices(url, qName);
	OnlinePayrollSystemService port = service.getPort(OnlinePayrollSystemService.class);
	
	BindingProvider bp = (BindingProvider)port;
	bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, opsServiceURL);
	
    response = port.searchUserSessions(userSessionsRequest);
    LOG.log(Level.INFO, "@@@@@@@@@@@@@@@@@@@@@@@@@ searchRuleRate Call is successfull");

} catch (FaultMessage e) {
    LOG.log(Level.SEVERE, "search: exception thrown", e);
    throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
} catch (javax.xml.ws.soap.SOAPFaultException e) {
    LOG.log(Level.SEVERE, "search: SOAPFaultException thrown", e);
    throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
} catch (WebServiceException e) {
    LOG.log(Level.SEVERE, "search: WebServiceException thrown", e);
    throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
} catch (Throwable th) {
    LOG.log(Level.SEVERE, "search: exception thrown", th);
    throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + th.getMessage());
}
return response;
} 

public static SearchUsersResponse searchUsers(SearchUsersRequest usersRequest) throws ServiceException{

SearchUsersResponse response = null;

try {

    QName qName = new QName("http://service.ops.com/ns/system", "OnlinePayrollServices");
	URL url = OnlinePayrollSystemServiceClient.class.getClassLoader().getResource("OnlinePayrollSystemService.wsdl");

	OnlinePayrollServices service = new OnlinePayrollServices(url, qName);
	OnlinePayrollSystemService port = service.getPort(OnlinePayrollSystemService.class);
	
	BindingProvider bp = (BindingProvider)port;
	bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, opsServiceURL);
	
    response = port.searchUsers(usersRequest);
    LOG.log(Level.INFO, "@@@@@@@@@@@@@@@@@@@@@@@@@ searchUsers Call is successfull");

} catch (FaultMessage e) {
    LOG.log(Level.SEVERE, "search: exception thrown", e);
    throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
} catch (javax.xml.ws.soap.SOAPFaultException e) {
    LOG.log(Level.SEVERE, "search: SOAPFaultException thrown", e);
    throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
} catch (WebServiceException e) {
    LOG.log(Level.SEVERE, "search: WebServiceException thrown", e);
    throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
} catch (Throwable th) {
    LOG.log(Level.SEVERE, "search: exception thrown", th);
    throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + th.getMessage());
}
return response;
} 
public static UpdateUsersResponse saveUsers(UpdateUsersRequest usersRequest) throws ServiceException{

UpdateUsersResponse response = null;

try {

    QName qName = new QName("http://service.ops.com/ns/system", "OnlinePayrollServices");
	URL url = OnlinePayrollSystemServiceClient.class.getClassLoader().getResource("OnlinePayrollSystemService.wsdl");

	OnlinePayrollServices service = new OnlinePayrollServices(url, qName);
	OnlinePayrollSystemService port = service.getPort(OnlinePayrollSystemService.class);
	
	BindingProvider bp = (BindingProvider)port;
	bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, opsServiceURL);

    response = port.updateUsers(usersRequest);
    LOG.log(Level.INFO, "@@@@@@@@@@@@@@@@@@@@@@@@@ UpdateUsers Call is successfull");

} catch (FaultMessage e) {
    LOG.log(Level.SEVERE, "Update: exception thrown", e);
    throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
} catch (javax.xml.ws.soap.SOAPFaultException e) {
    LOG.log(Level.SEVERE, "Update: SOAPFaultException thrown", e);
    throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
} catch (WebServiceException e) {
    LOG.log(Level.SEVERE, "Update: WebServiceException thrown", e);
    throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
} catch (Throwable th) {
    LOG.log(Level.SEVERE, "Update: exception thrown", th);
    throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + th.getMessage());
}
return response;
} 

public static SearchUserActionsResponse searchUserActions(SearchUserActionsRequest usersRequest) throws ServiceException{

SearchUserActionsResponse response = null;

try {

    QName qName = new QName("http://service.ops.com/ns/system", "OnlinePayrollServices");
	URL url = OnlinePayrollSystemServiceClient.class.getClassLoader().getResource("OnlinePayrollSystemService.wsdl");

	OnlinePayrollServices service = new OnlinePayrollServices(url, qName);
	OnlinePayrollSystemService port = service.getPort(OnlinePayrollSystemService.class);
	
	BindingProvider bp = (BindingProvider)port;
	bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, opsServiceURL);
	
    response = port.searchUserActions(usersRequest);
    LOG.log(Level.INFO, "@@@@@@@@@@@@@@@@@@@@@@@@@ searchUsers Call is successfull");

} catch (FaultMessage e) {
    LOG.log(Level.SEVERE, "search: exception thrown", e);
    throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
} catch (javax.xml.ws.soap.SOAPFaultException e) {
    LOG.log(Level.SEVERE, "search: SOAPFaultException thrown", e);
    throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
} catch (WebServiceException e) {
    LOG.log(Level.SEVERE, "search: WebServiceException thrown", e);
    throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
} catch (Throwable th) {
    LOG.log(Level.SEVERE, "search: exception thrown", th);
    throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + th.getMessage());
}
return response;
} 

public static SearchTaxAuthoritiesResponse searchTaxAuthorities(SearchTaxAuthoritiesRequest authoritiesRequest) throws ServiceException{

SearchTaxAuthoritiesResponse response = null;

try {

    QName qName = new QName("http://service.ops.com/ns/system", "OnlinePayrollServices");
	URL url = OnlinePayrollSystemServiceClient.class.getClassLoader().getResource("OnlinePayrollSystemService.wsdl");

	OnlinePayrollServices service = new OnlinePayrollServices(url, qName);
	OnlinePayrollSystemService port = service.getPort(OnlinePayrollSystemService.class);
	
	BindingProvider bp = (BindingProvider)port;
	bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, opsServiceURL);
	
    response = port.searchTaxAuthorities(authoritiesRequest);
    LOG.log(Level.INFO, "@@@@@@@@@@@@@@@@@@@@@@@@@ searchTaxAuthorities Call is successfull");

} catch (FaultMessage e) {
    LOG.log(Level.SEVERE, "search: exception thrown", e);
    throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
} catch (javax.xml.ws.soap.SOAPFaultException e) {
    LOG.log(Level.SEVERE, "search: SOAPFaultException thrown", e);
    throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
} catch (WebServiceException e) {
    LOG.log(Level.SEVERE, "search: WebServiceException thrown", e);
    throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
} catch (Throwable th) {
    LOG.log(Level.SEVERE, "search: exception thrown", th);
    throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + th.getMessage());
}
return response;
} 
public static UpdateTaxAuthoritiesResponse saveTaxAuthorities(UpdateTaxAuthoritiesRequest authoritiesRequest) throws ServiceException{

	UpdateTaxAuthoritiesResponse response = null;

try {

    QName qName = new QName("http://service.ops.com/ns/system", "OnlinePayrollServices");
	URL url = OnlinePayrollSystemServiceClient.class.getClassLoader().getResource("OnlinePayrollSystemService.wsdl");

	OnlinePayrollServices service = new OnlinePayrollServices(url, qName);
	OnlinePayrollSystemService port = service.getPort(OnlinePayrollSystemService.class);
	
	BindingProvider bp = (BindingProvider)port;
	bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, opsServiceURL);
	
    response = port.updateTaxAuthorities(authoritiesRequest);
    LOG.log(Level.INFO, "@@@@@@@@@@@@@@@@@@@@@@@@@ saveTaxAuthorities Call is successfull");

} catch (FaultMessage e) {
    LOG.log(Level.SEVERE, "Update: exception thrown", e);
    throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
} catch (javax.xml.ws.soap.SOAPFaultException e) {
    LOG.log(Level.SEVERE, "Update: SOAPFaultException thrown", e);
    throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
} catch (WebServiceException e) {
    LOG.log(Level.SEVERE, "Update: WebServiceException thrown", e);
    throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
} catch (Throwable th) {
    LOG.log(Level.SEVERE, "Update: exception thrown", th);
    throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + th.getMessage());
}
return response;
} 

public static RetrieveRolesResponse getRoles(RetrieveRolesRequest rolesRequest) throws ServiceException{

	RetrieveRolesResponse response = null;

try {

    QName qName = new QName("http://service.ops.com/ns/system", "OnlinePayrollServices");
	URL url = OnlinePayrollSystemServiceClient.class.getClassLoader().getResource("OnlinePayrollSystemService.wsdl");

	OnlinePayrollServices service = new OnlinePayrollServices(url, qName);
	OnlinePayrollSystemService port = service.getPort(OnlinePayrollSystemService.class);
	
	BindingProvider bp = (BindingProvider)port;
	bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, opsServiceURL);
	
    response = port.retrieveRoles(rolesRequest);
    LOG.log(Level.INFO, "@@@@@@@@@@@@@@@@@@@@@@@@@ getRoles Call is successfull");

} catch (FaultMessage e) {
    LOG.log(Level.SEVERE, "Update: exception thrown", e);
    throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
} catch (javax.xml.ws.soap.SOAPFaultException e) {
    LOG.log(Level.SEVERE, "Update: SOAPFaultException thrown", e);
    throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
} catch (WebServiceException e) {
    LOG.log(Level.SEVERE, "Update: WebServiceException thrown", e);
    throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + e.getMessage());
} catch (Throwable th) {
    LOG.log(Level.SEVERE, "Update: exception thrown", th);
    throw new ServiceException(ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_CODE,ParamConstants.OPS_SERVICE_TECHNICAL_EXCEPTION_MESSAGE + th.getMessage());
}
return response;
} 


public static void main(String arg[])
{
	SearchUserSessionsRequest request = new SearchUserSessionsRequest();
	try {
		OPSRecordAuditInfo info = new OPSRecordAuditInfo();
		info.setAction("S");
		info.setObjectType("10");
		info.setUpdatedBy("1");
		info.setUpdatedSession("b51a85a81cf0e0f9feb0a8502fce");
		request.setOPSRecordAuditInfo(info);
		SearchUserSessionsResponse response=searchUserSessions(request);
		System.out.println("Response:"+response.getOPSUserSessions().size());
	} catch (ServiceException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}
}
}